/**
 * Created by win 10 on 2/8/2018.
 */
/**
 获取地址栏参数
 */
function GetQueryString(name){
    var reg = new RegExp("(^|&)"+ name +"=([^&]*)(&|$)");
    var r = window.location.search.substr(1).match(reg);
    if(r!=null)return  unescape(r[2]); return null;
}
$(function () {
    var id = GetQueryString("id");
    $.ajax({
        url: '/sichuansfc/fund/notify/read.bs?id='+id,
        type: 'get',
        headers: {'FUND_USER_TOKEN': $.cookie('FUND_USER_TOKEN')},
        success: function (data) {
            if (data.status === 100000) {
                $(".title").text(data.data.title);
                $(".notice-content").html(data.data.body);
                $(".publish-name").text(data.data.author);
                $(".timer").text(parseCastingDate(data.data.addTime.toString(), 'yyyy年MM月dd日'));
            }
        },
        error: function () {
            alert('服务器异常，请稍后重试')
        }
    })
})